{extend name="base"}
{block name="title"}<title>热量消耗</title>{/block}
{block name="menu"}

<div id="srkll3" style="text-align: center;">
    <form action="http://jianfei.lightrain.org.cn/index/lurukll" method="post">
       还可以吃：{$hkyc}(kcal)  &nbsp;&nbsp;&nbsp;运动消耗：<input id="name6666" type="text" name="iwatch" />
        <button type="submit">提交</button>
    </form>
</div>
{/block}
{block name="js"}
<script type="text/javascript">
      // 基于准备好的dom，初始化echarts实例
      var myChart = echarts.init(document.getElementById('main'));

      option = {
              xAxis: {
                type: 'category',
                data: [
                        <?php echo $data['zhou']; ?>
                    ]
              },
              yAxis: {
                type: 'value'
              },
              series: [
                {
                  data: [<?php echo $data['kll']; ?>],
                  type: 'bar',
                  stack:'one',
                  label:{
                    show:true
                  },
                },
                {
                  data: [<?php echo $data['ydkll']; ?>],
                  type: 'bar',
                  stack:'one',
                  label:{
                    show:true
                  },
                },
                {
                  data: [<?php echo $data['eat']; ?>],
                  type: 'bar',
                  stack:'two',
                  label:{
                    show:true
                  },
                }

            ],
    };
  

      // 使用刚指定的配置项和数据显示图表。
      myChart.setOption(option);
    </script>
{/block}
